home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gximage3.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.9 KB  |  81 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gximage3.h,v 1.4 2000/09/19 19:00:38 lpd Exp $ */
  20. /* ImageType 3 internal API */
  21.  
  22. #ifndef gximage3_INCLUDED
  23. #  define gximage3_INCLUDED
  24.  
  25. #include "gsiparm3.h"
  26. #include "gxiparam.h"
  27.  
  28. /*
  29.  * The machinery for splitting an ImageType3 image into pixel and mask data
  30.  * is used both for imaging per se and for writing high-level output.
  31.  * We implement this by making the procedures for setting up the mask image
  32.  * and clipping devices virtual.
  33.  */
  34.  
  35. /*
  36.  * Make the mask image device -- the device that processes mask bits.
  37.  * The device is closed and freed at the end of processing the image.
  38.  */
  39. #define IMAGE3_MAKE_MID_PROC(proc)\
  40.   int proc(P5(gx_device **pmidev, gx_device *dev, int width, int height,\
  41.           gs_memory_t *mem))
  42. typedef IMAGE3_MAKE_MID_PROC((*image3_make_mid_proc_t));
  43.  
  44. /*
  45.  * Make the mask clip device -- the device that uses the mask image to
  46.  * clip the (opaque) image data -- and its enumerator.
  47.  * The device is closed and freed at the end of processing the image.
  48.  */
  49. #define IMAGE3_MAKE_MCDE_PROC(proc)\
  50.   int proc(P13(/* The initial arguments are those of begin_typed_image. */\
  51.            gx_device *dev,\
  52.            const gs_imager_state *pis,\
  53.            const gs_matrix *pmat,\
  54.            const gs_image_common_t *pic,\
  55.            const gs_int_rect *prect,\
  56.            const gx_drawing_color *pdcolor,\
  57.            const gx_clip_path *pcpath, gs_memory_t *mem,\
  58.            gx_image_enum_common_t **pinfo,\
  59.            /* The following arguments are added. */\
  60.            gx_device **pmcdev, gx_device *midev,\
  61.            gx_image_enum_common_t *pminfo,\
  62.            const gs_int_point *origin))
  63. typedef IMAGE3_MAKE_MCDE_PROC((*image3_make_mcde_proc_t));
  64.  
  65. /*
  66.  * Begin processing an ImageType 3 image, with the mask device creation
  67.  * procedures as additional parameters.
  68.  */
  69. int gx_begin_image3_generic(P11(gx_device * dev,
  70.                 const gs_imager_state *pis,
  71.                 const gs_matrix *pmat,
  72.                 const gs_image_common_t *pic,
  73.                 const gs_int_rect *prect,
  74.                 const gx_drawing_color *pdcolor,
  75.                 const gx_clip_path *pcpath, gs_memory_t *mem,
  76.                 IMAGE3_MAKE_MID_PROC((*make_mid)),
  77.                 IMAGE3_MAKE_MCDE_PROC((*make_mcde)),
  78.                 gx_image_enum_common_t **pinfo));
  79.  
  80. #endif /* gximage3_INCLUDED */
  81.